package com.mszl.blog.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mszl.blog.dao.dos.Archives;
import com.mszl.blog.dao.pojo.Article;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ArticleMapper extends BaseMapper<Article> {


//    @Select("select year(create_date) as year,month(create_date) as month,count(*) as count from ms_article group by year,month")
    List<Archives> listArchives();

    IPage<Article> listArticle(Page<Article> page, Long tagId, Long categoryId, String month, String year);
}
